package com.burges.net.function

import org.apache.flink.api.common.functions.RichMapFunction
import org.apache.flink.streaming.api.scala.{StreamExecutionEnvironment, _}

/**
  * 通过实现RichFunction接口创建Function接口
  * 创建人    BurgessLee
  * 创建时间   2020/1/25
  * 描述
  */
object FunctionIntefaceByRichFunction {

	def main(args: Array[String]): Unit = {
		val env = StreamExecutionEnvironment.getExecutionEnvironment
		val dataStream = env.fromElements("hello","world")
		dataStream.map(new RichMapFunction[String, Int] {
			def map(t : String): Int = {
				t.toInt
			}
		})
	}

}
